<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{
      background-color: green !important;/*加了!important，设置优先级最高*/
    }
    #d1{
      color: red;
      background-color: #0AA1ED;
    }/*字体红色,p标签和span标签y也变红了,继承*/

  </style>
</head>
<body>
<div id="d1">
  <p>这是p标签</p>
  <span>这是span</span>
  <a href="">这是超链接</a>
</div>

</body>
</html>